import urllib.request

# 下载网页
# url_page = 'http://www.baidu.com'
#
# # urlretrieve方法中的url参数代表的是下载的网页地址 filename代表文件的名字
# urllib.request.urlretrieve(url_page,'baidu.html')

# 下载图片
url_img = 'https://cdn.britannica.com/21/233921-050-69BE4DB8/Stephen-Curry-Golden-State-Warriors-Dillon-Brooks-Memphis-Grizzlies-NBA-action-2022.jpg'
urllib.request.urlretrieve(url=url_img,filename='curry.jpg')

# 下载视频
url_video = 'https://www.bilibili.com/ab357c45-115d-4b8e-af76-e6ecebccb1a8'
urllib.request.urlretrieve(url_video,'meinv.mp4')